﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace RuoVea.GoFastdfs.Common
{
    public static class Util
    {
        public static string ToJsonString(this object obj)
        {
            return JsonConvert.SerializeObject(obj);
        }
        public static JObject ToObject<T>(this string obj) {
            return JsonConvert.DeserializeObject<JObject>(obj);
        }
    }
}
